<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>配送明细</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<style>
		.main-bg1 {
			padding-bottom: 0px;
		}
		.text-name {
			display: inline-block;
			padding: 5px 0px;
			color: #666;
			width: auto;
			font-size: 14px;
			text-align: right;
		}
		.content-table-three tbody tr td {
			max-width: 350px;
			min-width: 100px;
		}
		.content-table-three thead tr td span {
			color: #4d5971;
			display: inline-block;
			word-wrap: break-word;
			width: auto;
			line-height: 20px;
			vertical-align: top;
			margin-top: 10px;
		}
		.content-table-three tbody tr td p {
			text-align: right;
			padding-left: 12px;
		}
		.content-table-three tbody tr td span{
			padding-right: 12px;
		}
		.content-table-three thead tr td:nth-child(2) span {
			color: #4d5971;
			display: inline-block;
			word-wrap: break-word;
			width: 300px;
			line-height: 20px;
			vertical-align: top;
			margin-top: 10px;
		}
		.content-table-three thead tr td:last-child {
			line-height: 40px;
			background: #F9FBFF;
			text-align: right;
			padding-right: 12px;
		}
		.content-table-three thead tr td:last-child span {
			color: #4d5971;
			display: inline-block;
			width: auto;
			line-height: 20px;
			vertical-align: top;
			margin-top: 10px;
		}
		.content-table-three tbody tr td:nth-child(1){
			width: 150px;
		}
		.content-table-three tbody tr td:nth-child(2){
			width: 160px;
		}
		.content-table-three tbody tr td:nth-child(3){
			width: 220px;
		}
		.content-table-three tbody tr td:nth-child(4){
			width: 180px;
		}
		.content-table-three tbody tr td:nth-child(5){
			width: 180px;
		}
		.content-table-three tbody tr td:nth-child(6){
			width: 70px !important;
			min-width: 70px;
		}
		.content-table-three tbody tr td:nth-child(1) span{
			width: 75px;
		}
		.content-table-three tbody tr td:nth-child(2) span{
			width: 85px;
		}
		.content-table-three tbody tr td:nth-child(3) span{
			width: 150px;
		}
		.content-table-three tbody tr td:nth-child(4) span{
			width: 105px;
		}
		.content-table-three tbody tr td:nth-child(5) span{
			width: 105px;
		}
		.content-table-three tbody tr:nth-child(2) td p {
			text-align: left;
		}
		.content-table-three tbody tr:nth-child(2) td p>span {
			width: auto;
		}
		.color-operation:hover {
			text-decoration:underline;
			cursor: pointer;
		}
		.content-form input {
			width: 120px;
		}
	</style>
</head>
<body>
	<div class="main-content">
		<div class="main-bg1">
			<ul class="product-title clearfix">
				<li><a href="contractDistribution.html">纸质合同配送</a></li>
				<li class="title-active"><a class="color-operation" href="contractDistribution1.html">配送明细</a></li>
			</ul>
			<div class="product-content clearfix">
				<!-- 费用清单 -->
				<div class="product-child">
					<div class="product-child-content">
						<p class="content-title matop">配送明细</p>
						<a href="addDetaileddistribution.html" class="newset-btn icon-add clearfix">+&nbsp;新增配送</a>
						<div class="content-info">
							<div class="content-form">
								<form id = "expressInformation">
									<ul>
										<li><span class="text-name">快递单号：</span><input type="text" name = "tracknumber" ></li>
										<li><span class="text-name">部门名称：</span><input type="text" name = "addressee" ></li>
										<li><span class="text-name">配送状态：</span><input type="text" name = "status"></li>
										<li>
											<button class="btn-style-two" id = "expressInformationSearch" onclick = "return false">搜索</button>
											<i class="btn-operation maleft20">重置</i>
										</li>
									</ul>
								</form>
							</div>
							<div dataTableTable = "true" bindForm="expressInformation" bindClick = "expressInformationSearch" dataAction = "/expressInformation/findDetails">
								<table class="content-table-three" cellspacing="0" cellpadding="0">
									<thead>
										<tr>
											<td>项目编号：<span type = "table" name = "contractInbound.projectcode"></span></td>
											<td colspan="3">项目名称：<span type = "table" name = "contractInbound.projectname"></span></td>
											<td colspan="2">签收状态：<span type = "table" name = "status"></span></td>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td>
												<p>配送状态：<span>已配送</span></p>
											</td>
											<td>
												<p>部门名称：<span type = "table" name = "departmentname"></span></p>
												<p>发送数量：<span type = "table" name = "expressInbound.number"></span></p>
											</td>
											<td>
												<p>快递单号：<span class="color-operation" onclick="seeLogistics()" type = "table" name = "tracknumber"></span></p>
												<p>合同编号：<span type = "table" name = "expressInbound.contractnumber"></span></p>
											</td>
											<td>
												<p>创建人：<span type = "table" name = "updateBy.name"></span></p>
												<p>创建时间：<span type = "table" name = "updateDate"></span></p>
											</td>
											<td>
												<p>签收人：<span type = "table" name = "signBy.name"></span></p>
												<p>签收时间：<span type = "table" name = "signDate"></span></p>
											</td>
											<td>
												<a href="updDetaileddistribution.html" class="btn-operation clearfix">编辑</a>
												<i class="btn-operation1" onclick="del()">撤销配送</i>
											</td>
										</tr>
										<tr>
											<td colspan="6">
												<p>退回说明：<span type = "table" name = "reason"></span></p>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script>
		function  del(){
			var data = $("table").getAllData()[i];
			var param = new FormData();
			param.append("id",data.id);
			param.append("tracknumber",data.tracknumber);
			parent.layer.confirm('确认撤销配送么？', {
				btn: ['确定','取消'] //按钮
			}, function(){
				$.ajax({
			        type: 'post',
			        url:baseUrl + "/expressInformation/delete",
			        contentType: false,  
			        processData: false, 
			        async: false,
			        data:param
				}).done(function(dt){
					if(dt == 0){
						parent.layer.msg("改批合同已开始配送,不能撤销入库。");
					}
					parent.layer.closeAll();
					$("table").ECDATable();
				});
			},function(){
				parent.layer.closeAll();
			});
		}
		function seeLogistics(){
		  	parent.layer.open({
			  type: 2,
			  title: '查看物流',
			  shadeClose: true,
			  shade: 0.2,
			  maxmin: true, //开启最大化最小化按钮
			  area: ['870px', '450px'],
			  content: 'seeLogistics.html'
			});
        }
		function bj(i){
			parent.setData($("table").getAllData()[i]);
			console.log(parent.data);
			//windown.location.href = "updDetaileddistribution.html";
		}
		function tableCallBack (my){
		}
        function getHeight(){
            var myiframeH=$(".main-content").height();
            var _parent=$(window.parent.document);
            _parent.find('body').css('height',(myiframeH+150)+'px');
            _parent.find('.main-position').css('height',(myiframeH+100)+'px');
        };
        $('.main-content').resize(function(){
            getHeight();
        });
	</script>
	<script type="text/javascript" src = "js/tableTable.js"></script>
	<script type="text/javascript" src = "js/allProduct.js"></script>
</body>
</html>